<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>square</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        .pkBox{
            width: 155px;
            height: 155px;
            position: relative;
            margin:300px auto;
        }
        .pkBox > div{
            width: 100%;
            height: 100%;
            border:1px solid #000;
            border-radius: 10px;
            position: absolute;
            left: 0;
            top: 0;
            /*添加过渡*/
            transition: transform 1s;
            /*设置旋转轴心*/
            transform-origin: center center;
        }
        /*添加鼠标上移的效果*/
        .pkBox:hover >div:nth-of-type(1){
            transform: rotate(5deg);
        }
        .pkBox:hover >div:nth-of-type(2){
            transform: rotate(10deg);
        }
        .pkBox:hover >div:nth-of-type(3){
            transform: rotate(15deg);
        }
        .pkBox:hover >div:nth-of-type(4){
            transform: rotate(20deg);
        }
        .pkBox:hover >div:nth-of-type(5){
            transform: rotate(25deg);
        }
        .pkBox:hover >div:nth-of-type(6){
            transform: rotate(30deg);
        }
    </style>
</head>
<body>
    <div class="pkBox">
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </div>
</body>
</html>